//
//  CallStarCell.m
//  LiveStar
//
//  Created by 漪珊 on 2017/4/11.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "CallStarCell.h"
#import "CallStarModel.h"

@implementation CallStarCell
- (void)awakeFromNib {
    [super awakeFromNib];
    kButtonRadius(self.supportBtn, 5);
    self.starIcon.image = kPlACE_ICON;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(leaveWordListAction:)];
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(leaveWordListAction:)];
    [self.leavewordNum addGestureRecognizer:tap];
    [self.leavewordTitle addGestureRecognizer:tap1];
}

- (void)setCallStarModel:(CallStarModel *)callStarModel {
    _callStarModel = callStarModel;
    self.starName.text = callStarModel.s_name;
    self.supportDetail.text = KString(callStarModel.s_number);
    self.leavewordNum.text = KString(callStarModel.s_comment);
}

#pragma mark -- 呼唤明星
- (IBAction)callStarAction:(id)sender {
    if (self.callStar) {
        self.callStar();
    }
}

//产看呼唤明星留言
- (void)leaveWordListAction:(UITapGestureRecognizer *)tap {
    if ([self.delegate respondsToSelector:@selector(callStarLeavewordListWithCell:)]) {
        [self.delegate callStarLeavewordListWithCell:self];
    }
}
@end
